home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / wwbbs31_source.lha / WWBBS / Programming / Programming.doc < prev    next >
Text File  |  1995-04-02  |  2KB  |  49 lines

  1. World Wide BBS 3.0 (2.4.95)
  2. Copyright ⌐á1995 Arthur Choung
  3. ---
  4.  
  5.      Just want to tell you that when you are executing another program you
  6. should use SetMode() to change the input mode to CON (cooked) and then
  7. change it back to RAW, if in fact you do use raw mode in the first place.
  8. Most programs probably expect to be in CON mode and those who do switch to
  9. RAW probably change to CON upon exiting.
  10.  
  11.      If you choose to use the shared library wwbbs.library, then you must
  12. not perform the standard break checking code (control-c) as it may abort
  13. while writing an all-important config file.  You should always check for
  14. a control-c though, and I recommend that you have a global variable named
  15. panic, or something to that effect, and set it when a break is received.
  16. And then of course check the panic variable during loops or wherever else
  17. appropriate.  I use:
  18.  
  19. BOOL panic=FALSE;
  20. void __regargs _CXBRK(void);
  21. void __regargs _CXBRK(void) { panic=TRUE; }
  22.  
  23.      Functions such as getchar(), etc. will return the EOF-condition when a
  24. panic condition has occurred, such as loss of carrier.
  25.  
  26.      You can use embedded codes to use the builtin color codes of WWBBS,
  27. through printf(), puts(), etc.  There are:
  28.  
  29.      ~r - reset terminal (ESC [0m)
  30.      ~h - header color as defined in SystemPrefs
  31.      ~i - input color
  32.      ~o - output color
  33.      ~p - prompt color
  34.      ~s - system color
  35.  
  36.      There is also a support lib code which you can link to your programs.
  37. It provides five functions, Ask(), GetLine(), ShowText(), RunEditor(), and
  38. Pager()..  It was compiled with SAS/C.  I have included the source so you
  39. can use it with other compilers.
  40.  
  41.      I have included the "include" files for using wwbbs.library.  Note
  42. that the pragmas are for use with SAS/C, but I have included the .fd file
  43. to allow you to create your own pragmas.  Note that many of the functions
  44. have accompanying "build-on-the-stack" tag calls, so you will have to
  45. create those also if you wish to use them.
  46.  
  47.      I will attempt to fully document the use of wwbbs.library in the next
  48. release.
  49.